from django.db import models

class User(models.Model):
    uname = models.CharField(max_length=100)
    pwd = models.CharField(max_length=100)

class NewsType(models.Model):
    tname = models.CharField(max_length=50)

class Newsinfo(models.Model):
    tit = models.CharField(max_length=100,null=False)
    ath = models.CharField(max_length=100,null=False)
    cont = models.CharField(max_length=100,null=False)
    dat = models.DateField(auto_now_add=True)
    ns = models.BooleanField()
    NewsType = models.ForeignKey(NewsType,on_delete=models.CASCADE)
